<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
<style>
.label{
font-weight:bold;
}
</style>
    <rich:panel>
        <f:facet name="header">
            <h:outputText value="AMIGOS"></h:outputText>
        </f:facet>
		<h:form>
	        <rich:dataGrid value="#{perfilMBean.todosAmigos}" var="amigo" columns="4" elements="8" width="100%" style="height:100%">
		            <rich:panel>
		                <h:panelGrid columns="1" >
		                    <h:commandLink>
		                    	<h:graphicImage value="#{amigo.urlFoto}"/><br/>
		                    	<h:outputText value="#{amigo.nome}" />
								<f:setPropertyActionListener value="#{amigo.id}" target="#{perfilMBean.idUsuarioSelecionado}" />
		                    </h:commandLink>
		                </h:panelGrid>
		            </rich:panel>
		            <f:facet name="footer">
		                <rich:datascroller rendered="#{maisAmigosMBean.mostrarMaisAmigos == 1}" ></rich:datascroller>
		            </f:facet>
	        </rich:dataGrid>
		</h:form>
        <h:form>
       		<h:commandButton value="+ Amigos" action="#{maisAmigosMBean.mostrarAmigos}"/>
       		<h:inputHidden value="#{perfilMBean.idUsuarioSelecionado}" />
       	</h:form>
    </rich:panel>       
</ui:composition>